package com.ykt.model;

import java.util.List;

import com.jfinal.plugin.activerecord.Model;

/**
 * 商品规格表
 * @author tianjun
 *
 */
public class ProductSpec extends Model<ProductSpec>{

	private static final long serialVersionUID = 1L;
	public static final ProductSpec dao = new ProductSpec();
	
	public Product getProduct(){
		return Product.dao.findById(this.getInt("product_id"));
	}
	
	public List<ProductImg> getProductSpecImgs(){
		String sql="select * from product_img where goods_id=?";
		return ProductImg.dao.find(sql, this.getInt("id"));
	}
}
